﻿project(gtk_demo)
cmake_minimum_required(VERSION 3.1)


# 查找GTK3包
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)

# 设置包含目录和链接目录
include_directories(${GTK3_INCLUDE_DIRS})
link_directories(${GTK3_LIBRARY_DIRS})

# 添加可执行文件
add_executable(gtk_demo main.cpp)

# 链接GTK3库
target_link_libraries(gtk_demo ${GTK3_LIBRARIES})

